class Person:

    def __init__(self, name, weight):
        """使用初始化方法指定属性的默认值"""
        self.name = name
        self.weight = weight 

    
    def __str__(self):
        return "我的名字叫：%s, 我的体重是：%.2f 公斤" % (self.name, self.weight)

    
    def run(self):
        print("%s 爱跑步" % self.name)

    
    def eat(self):
        print("%s 吃东西" % self.name)


# 创建对象
xiaoming = Person("小明", 75)
xiaoming.run()
xiaoming.eat()
print(xiaoming)

print("-" * 50)

# 创建另一个对象
xiaomei = Person("小美", 50)
xiaomei.run()
xiaomei.eat()
print(xiaomei)
